using System;
using Pine.SourceParser.Tree;
using System.Reflection.Emit;
using Pine.Core;

namespace Pine.CodeGen
{
	public static class NameIdentifierCodeGenerator
	{
		public static void GenerateBytecode(Context ctx, Expression expr, LocalBuilder lb) {
			CodeUtilities.MakeScopeRead(ctx, ((NameIdentifier) expr).name);
			ctx.il.Emit(OpCodes.Stloc, lb);
		}
	}
}

